package com.honeybee.cloud.framework.base.exception.service;

import com.honeybee.cloud.framework.base.exception.ExceptionEnum;
import lombok.Getter;

/**
 * @Description 异常enums
 * @Author DELL
 * @Create 2018-12-08
 * @Since 1.0.0
 */
public enum ServiceExceptionEnum {
    MOMENT_USER_SERVICE(1, "moment-user-service 服务异常"),
    MOMENT_ROLE_SERVICE(2, "moment-role-service 服务异常"),
    MOMENT_RESOURCE_SERVICE(3, "moment-resource-service 服务异常"),
    MOMENT_CRAWLER_SERVICE(4, "moment-crawler-service 服务异常"),
    MOMENT_TICKET_SERVICE(5, "moment-ticket-service 服务异常"),
    MOMENT_SOCKET_SERVICE(6, "moment-socket-service 服务异常"),
    MOMENT_TENCENT_USER_SERVICE(7, "moment_tencent_user_service 服务异常"),
    ORGANIZATION_USER_SERVICE(8, "organization_user_service 服务异常");

    @Getter
    private Integer parentCode = ExceptionEnum.SERVICE.getCode();
    @Getter
    private Integer subCode;
    @Getter
    private String message;


    ServiceExceptionEnum(Integer subCode, String message) {
        this.subCode = subCode;
        this.message = message;
    }

    public static String getParentMessage() {
        return ExceptionEnum.SERVICE.getRemark();
    }
}
